#include "CryptoInit.h"

#include <qglobal.h>

#ifdef Q_WS_WIN
#include "QtMutex.h"
#endif

/*
	CryptoInit
*/

#ifdef Q_WS_WIN

CryptoInit::CryptoInit() {
	Botan::Init::set_mutex_type(new QtMutex);
	botan_init = new Botan::LibraryInitializer("secure_memory");
}

#else

CryptoInit::CryptoInit() {
	botan_init = new Botan::LibraryInitializer("secure_memory thread_safe");
}

#endif

CryptoInit::~CryptoInit() {
	delete botan_init;
}

